package com.nuoniu.sibanyun.mapper.production;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.production.ErpBomGroup;
import org.apache.ibatis.annotations.Select;


/**
 * <p>
 * bom分组 Mapper 接口
 * </p>
 *
 * @author 小啊刚
 * @since 2021-07-13
 */
public interface ErpBomGroupMapper extends BaseMapper<ErpBomGroup> {

    /**
     * 根据名称获取分组
     * @author 小啊刚
     * @date 2021-07-13
     */
    @Select("select * from mab_bom_group where company_id=#{companyId} and name=#{name}")
    ErpBomGroup getByName(ErpBomGroup bomGroup);

    @Select("select * from mab_bom_group where company_id=#{companyId} and code=#{code}")
    ErpBomGroup getByCode(ErpBomGroup bomGroup);
}
